using System;
using System.Collections.Generic;
using System.Text;

namespace Ares.Walker
{
    public delegate void WalkerErrorEventHandler(Exception E);
    public delegate void WalkerWaitEventHandler(int Minutes, int Seconds);
    public delegate void WalkerSentEventHandler(int No, string Proxy);    
    public delegate void WalkerSendingEventHandler(int No, string Proxy);

    public abstract class WalkerBase
    {
        public event WalkerErrorEventHandler Error;
        public event WalkerWaitEventHandler Wait;
        public event WalkerSendingEventHandler Sending;
        public event WalkerSentEventHandler Sent;

        protected void DoWait(int Minutes, int Seconds)
        {
            if (Wait != null)
            {
                Wait(Minutes, Seconds);
            }
        }

        protected void DoError(Exception e)
        {
            if (Error != null)
            {
                Error(e);
            }
        }

        protected void DoSent(int No, string Proxy)
        {
            if (Sent != null)
            {
                Sent(No, Proxy);
            }
        }

        protected void DoSending(int No, string Proxy)
        {
            if (Sending != null)
            {
                Sending(No, Proxy);
            }
        }


        public abstract void Start();
        public abstract void Terminate();
    }
}
